package com.npjscg.medicalpro.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.npjscg.medicalpro.controller.dto.UserDTO;
import com.npjscg.medicalpro.controller.dto.UserPasswordDTO;
import com.npjscg.medicalpro.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.mail.MessagingException;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author raote
 * @since 2022-06-23
 */
public interface IUserService extends IService<User> {

    UserDTO login(UserDTO userDTO);

    void changePassword(UserPasswordDTO passwordDTO);

    User register(UserDTO userDTO);

    IPage selectPage(Page<User> page, String username);

    void edit(UserDTO userDTO);

    void sendEmailCode(String email, Integer type) throws MessagingException;

    UserDTO loginEmail(UserDTO userDTO);
}
